package com.stb.shared.domain;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class User {
	
	@PrimaryKey
    private String email;
	private String password;
	private boolean active;

	@Override
	public String toString() {
		return this.email;
	}

	public String getPassword() {
		return this.password;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public boolean isActive() {
		return active;
	}

	public static class Builder {
		private User user = new User();
		
		public User build() {
			return this.user;
		}

		public Builder email(String email) {
			this.user.email = email;
			return this;
		}
		
		public Builder password(String password) {
			this.user.password = password;
			return this;
		}
	}
}

